home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_76 / delay.c next >
Encoding:
C/C++ Source or Header  |  1995-01-01  |  377 b   |  23 lines

  1. /* delay - Pauses for a specified number of microseconds. Used to slow
  2.  * life by delaying between generations.
  3.  * Params: wait - time in microseconds
  4.  * Return: None
  5.  */
  6.  
  7. #include <wesson.h>
  8.  
  9. void delay(clock_t wait)
  10. {
  11.     clock_t t1, t2;
  12.  
  13.     if(!wait) return;
  14.  
  15.     t1 = wait + clock();
  16.     do
  17.        {
  18.         t2 = clock();
  19.        }
  20.     while( t2 < t1 );
  21. }
  22.  
  23.